home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-08-16 | 21.5 KB | 707 lines | [TEXT/MPS ] |
- /*----------------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # MacApp Color QuickDraw Fractal Sample Application
- #
- # FracApp
- #
- # MFracApp.r - Rez Source
- #
- # Copyright © 1988 Apple Computer, Inc.
- # All rights reserved.
- #
- # Versions: 1.0 8/88
- #
- # Components: MFracApp.p August 1, 1988
- # UFracApp.p August 1, 1988
- # UFracApp.inc1.p August 1, 1988
- # FracApp.r August 1, 1988
- # FracApp.make August 1, 1988
- #
- # This is a program to calculate the Mandelbrot set, allowing you to zoom in on areas
- # that are selected with the mouse. There are some special color tricks played
- # in order to make the program more jazzy. A special color table is used to give
- # smooth transitions from one color to the next. Color table animation is also
- # supported, for the wowem effect of flowing Mandelbrot images.
- # The program is written in MacApp 1.1, which explains why it has a real user
- # interface. Mandelbrot images take about 30 minutes to calculate. It is
- # Juggler aware so you can put the program in the background where it will
- # continue to calculate, while you do something more important, like look at
- # the source code. It also handles multiple documents, and reading/writing of
- # PICT files using the bottlenecks to minimize the memory hit.
- #
- # This program is intended to be a real world example of handling color in a
- # nontrivial fashion. As such it has some rather special color requirements,
- # and those don’t match the current system architecture very well. The program
- # is designed to be compatible with the future, it will not break in future
- # systems. However, it does not use the Palette Manager, which means that
- # there will be situations where the colors will not look right in either FracApp
- # or another program running under MultiFinder. The approach that FracApp
- # uses is thus not the preferred Apple approach and does NOT have the Apple
- # seal of approval from engineering. The only way to get the stamp of approval
- # is to use the Palette Manager. To do a program of this form, you cannot
- # use the Palette Manager without some extra hacks that are compatibility
- # risks in themselves. So... use at your own risk. If you are forced to revise your
- # program because you followed this as an example, you cannot gripe to Apple, since
- # it is not fully approved. You just have to change your program, which I hope is no
- # big deal. You can give this code to other people, as long as they recognize
- # that it is not fully approved too.
- #
- # Unless you have very special color requirements, you should use the Palette
- # Manager. It works for most things, and is much easier to use than the
- # approach taken here. There are a few things it won’t do of course, leading
- # to this code. If you can do it, use the Palette Manager and save yourself
- # some grief.
- # Written in MacApp Object Pascal code.
- # Compatibility rating = 2. (nothing will break, but it may not
- # always look correct.)
- #
- ----------------------------------------------------------------------------------------*/
- /* Copyright 1988 by Bob. */
- /* February 1, 1988 */
- /* Written by Bo3b Johnson of Developer Technical Support. */
-
- #ifdef Debugging
- include MacAppRFiles"Debug.rsrc";
- #endif
- include MacAppRFiles"MacApp.rsrc";
- include MacAppRFiles"Printing.rsrc";
-
- include "FracApp" 'CODE';
-
- resource 'WIND' (1001, purgeable) {
- {50, 20, 200, 450},
- zoomDocProc,
- invisible,
- goAway,
- 0x0,
- "<<<>>>"
- };
-
-
- /* The brave new approach. This will be the clut resource that we use to do the color
- table for the offscreen bitmap. This is a set of colors that we specifically want
- in our bitmap, the only ones that we use. This table has all the artificial requirements
- that a color table normally has, like having white first, black last. This color
- table is the one really desired for the actual fractals, so it will be used only
- for the offscreen map. Resource Id is to be in 0..1023 to start with, since it will
- become the initial ctSeed number. This is currently done as straight hex since
- I cannot stand the incredibly stupid rez syntax and refuse to waste my time
- programming rez when I really want to be programming FracApp. */
-
- data 'clut' (501, preload, nonpurgeable) {
- $"0000 0000 8000 00FF" /* 256 total colors used */
-
- /* Now the actual colors in the table. The values are overwritten by color QD
- when needed, but are added here, just to keep this data straight. */
- $"0000 FFFF FFFF FFFF" /* first color must be white of course. */
- $"0001 FFFF 0000 0000"
- $"0002 FFFF 0400 0000"
- $"0003 FFFF 0800 0000"
- $"0004 FFFF 0C00 0000"
- $"0005 FFFF 1000 0000"
- $"0006 FFFF 1400 0000"
- $"0007 FFFF 1800 0000"
- $"0008 FFFF 1C00 0000"
- $"0009 FFFF 2000 0000"
- $"000A FFFF 2400 0000"
- $"000B FFFF 2800 0000"
- $"000C FFFF 2C00 0000"
- $"000D FFFF 3000 0000"
- $"000E FFFF 3400 0000"
- $"000F FFFF 3800 0000"
- $"0010 FFFF 3C00 0000"
- $"0011 FFFF 4000 0000"
- $"0012 FFFF 4400 0000"
- $"0013 FFFF 4800 0000"
- $"0014 FFFF 4C00 0000"
- $"0015 FFFF 5000 0000"
- $"0016 FFFF 5400 0000"
- $"0017 FFFF 5800 0000"
- $"0018 FFFF 5C00 0000"
- $"0019 FFFF 6000 0000"
- $"001A FFFF 6400 0000"
- $"001B FFFF 6800 0000"
- $"001C FFFF 6C00 0000"
- $"001D FFFF 7000 0000"
- $"001E FFFF 7400 0000" /* color 30 of the fixed colors we use. */
- $"001F FFFF 7800 0000"
- $"0020 FFFF 7C00 0000"
- $"0021 FFFF 8000 0000"
- $"0022 FFFF 8400 0000"
- $"0023 FFFF 8800 0000"
- $"0024 FFFF 8C00 0000"
- $"0025 FFFF 9000 0000"
- $"0026 FFFF 9400 0000"
- $"0027 FFFF 9800 0000"
- $"0028 FFFF 9C00 0000"
- $"0029 FFFF A000 0000"
- $"002A FFFF A400 0000"
- $"002B FFFF A800 0000"
- $"002C FFFF AC00 0000"
- $"002D FFFF B000 0000"
- $"002E FFFF B400 0000"
- $"002F FFFF B800 0000"
- $"0030 FFFF BC00 0000"
- $"0031 FFFF C000 0000"
- $"0032 FFFF C400 0000"
- $"0033 FFFF C800 0000"
- $"0034 FFFF CC00 0000"
- $"0035 FFFF D000 0000"
- $"0036 FFFF D400 0000"
- $"0037 FFFF D800 0000"
- $"0038 FFFF DC00 0000"
- $"0039 FFFF E000 0000"
- $"003A FFFF E400 0000"
- $"003B FFFF E800 0000"
- $"003C FFFF EC00 0000" /* color 60 */
- $"003D FFFF F000 0000"
- $"003E FFFF F400 0000"
- $"003F FFFF F800 0000"
- $"0040 FFFF FC00 0000"
- $"0041 FFFF FFFF 0000" /* 65 end of first set. */
- $"0042 0000 FFFF 0000"
- $"0043 0000 FFFF 0400"
- $"0044 0000 FFFF 0800"
- $"0045 0000 FFFF 0C00"
- $"0046 0000 FFFF 1000"
- $"0047 0000 FFFF 1400"
- $"0048 0000 FFFF 1800"
- $"0049 0000 FFFF 1C00"
- $"004A 0000 FFFF 2000"
- $"004B 0000 FFFF 2400"
- $"004C 0000 FFFF 2800"
- $"004D 0000 FFFF 2C00"
- $"004E 0000 FFFF 3000"
- $"004F 0000 FFFF 3400"
- $"0050 0000 FFFF 3800"
- $"0051 0000 FFFF 3C00"
- $"0052 0000 FFFF 4000"
- $"0053 0000 FFFF 4400"
- $"0054 0000 FFFF 4800"
- $"0055 0000 FFFF 4C00"
- $"0056 0000 FFFF 5000"
- $"0057 0000 FFFF 5400"
- $"0058 0000 FFFF 5800"
- $"0059 0000 FFFF 5C00"
- $"005A 0000 FFFF 6000"
- $"005B 0000 FFFF 6400"
- $"005C 0000 FFFF 6800"
- $"005D 0000 FFFF 6C00"
- $"005E 0000 FFFF 7000"
- $"005F 0000 FFFF 7400"
- $"0060 0000 FFFF 7800"
- $"0061 0000 FFFF 7C00"
- $"0062 0000 FFFF 8000"
- $"0063 0000 FFFF 8400"
- $"0064 0000 FFFF 8800" /* color 100 */
- $"0065 0000 FFFF 8C00"
- $"0066 0000 FFFF 9000"
- $"0067 0000 FFFF 9400"
- $"0068 0000 FFFF 9800"
- $"0069 0000 FFFF 9C00"
- $"006A 0000 FFFF A000"
- $"006B 0000 FFFF A400"
- $"006C 0000 FFFF A800"
- $"006D 0000 FFFF AC00"
- $"006E 0000 FFFF B000"
- $"006F 0000 FFFF B400"
- $"0070 0000 FFFF B800"
- $"0071 0000 FFFF BC00"
- $"0072 0000 FFFF C000"
- $"0073 0000 FFFF C400"
- $"0074 0000 FFFF C800"
- $"0075 0000 FFFF CC00"
- $"0076 0000 FFFF D000"
- $"0077 0000 FFFF D400"
- $"0078 0000 FFFF D800"
- $"0079 0000 FFFF DC00"
- $"007A 0000 FFFF E000"
- $"007B 0000 FFFF E400"
- $"007C 0000 FFFF E800"
- $"007D 0000 FFFF EC00"
- $"007E 0000 FFFF F000"
- $"007F 0000 FFFF F400"
- $"0080 0000 FFFF F800"
- $"0081 0000 FFFF FC00"
- $"0082 0000 FFFF FFFF" /* 130 end of 2nd set. */
- $"0083 0000 0000 FFFF"
- $"0084 0400 0000 FFFF"
- $"0085 0800 0000 FFFF"
- $"0086 0C00 0000 FFFF"
- $"0087 1000 0000 FFFF"
- $"0088 1400 0000 FFFF"
- $"0089 1800 0000 FFFF"
- $"008A 1C00 0000 FFFF"
- $"008B 2000 0000 FFFF"
- $"008C 2400 0000 FFFF"
- $"008D 2800 0000 FFFF"
- $"008E 2C00 0000 FFFF"
- $"008F 3000 0000 FFFF"
- $"0090 3400 0000 FFFF"
- $"0091 3800 0000 FFFF"
- $"0092 3C00 0000 FFFF"
- $"0093 4000 0000 FFFF"
- $"0094 4400 0000 FFFF"
- $"0095 4800 0000 FFFF"
- $"0096 4C00 0000 FFFF" /* color 150 */
- $"0097 5000 0000 FFFF"
- $"0098 5400 0000 FFFF"
- $"0099 5800 0000 FFFF"
- $"009A 5C00 0000 FFFF"
- $"009B 6000 0000 FFFF"
- $"009C 6400 0000 FFFF"
- $"009D 6800 0000 FFFF"
- $"009E 6C00 0000 FFFF"
- $"009F 7000 0000 FFFF"
- $"00A0 7400 0000 FFFF"
- $"00A1 7800 0000 FFFF"
- $"00A2 7C00 0000 FFFF"
- $"00A3 8000 0000 FFFF"
- $"00A4 8400 0000 FFFF"
- $"00A5 8800 0000 FFFF"
- $"00A6 8C00 0000 FFFF"
- $"00A7 9000 0000 FFFF"
- $"00A8 9400 0000 FFFF"
- $"00A9 9800 0000 FFFF"
- $"00AA 9C00 0000 FFFF"
- $"00AB A000 0000 FFFF"
- $"00AC A400 0000 FFFF"
- $"00AD A800 0000 FFFF"
- $"00AE AC00 0000 FFFF"
- $"00AF B000 0000 FFFF" /* color 175 */
- $"00B0 B400 0000 FFFF"
- $"00B1 B800 0000 FFFF"
- $"00B2 BC00 0000 FFFF"
- $"00B3 C000 0000 FFFF"
- $"00B4 C400 0000 FFFF"
- $"00B5 C800 0000 FFFF"
- $"00B6 CC00 0000 FFFF"
- $"00B7 D000 0000 FFFF"
- $"00B8 D400 0000 FFFF"
- $"00B9 D800 0000 FFFF"
- $"00BA DC00 0000 FFFF"
- $"00BB E000 0000 FFFF"
- $"00BC E400 0000 FFFF"
- $"00BD E800 0000 FFFF"
- $"00BE EC00 0000 FFFF"
- $"00BF F000 0000 FFFF"
- $"00C0 F400 0000 FFFF"
- $"00C1 F800 0000 FFFF"
- $"00C2 FC00 0000 FFFF"
- $"00C3 FFFF 0000 FFFF" /* 195 end of 3rd set. */
-
- /* Since we are blasting the color table, the Palette Manager can’t do as good
- a job as normal. In order to help him out, we want to add the colors that
- are for the system palette. With these colors around there will be less
- problems with color matching, and specifically the Apple Menu will appear
- correctly. These colors will be forced into the color table as well, but
- they won’t be animated and will still be available for drawing (unlike the
- colors used in the fractals. */
-
- $"00C4 FC00 F37D 052F" /* next 14 entries from system palette */
- $"00C5 FFFF 648A 028C"
- $"00C6 DD6B 08C2 06A2" /* they are always there. */
- $"00C7 F2D7 0856 84EC"
- $"00C8 46E3 0000 A53E"
- $"00C9 0000 0000 D400"
- $"00CA 0241 AB54 EAFF"
- $"00CB 1F21 B793 1431"
- $"00CC 0000 64AF 11B0"
- $"00CD 5600 2C9D 0524"
- $"00CE 90D7 7160 3A34"
- $"00CF C000 C000 C000"
- $"00D0 8000 8000 8000"
- $"00D1 4000 4000 4000"
-
- /* Now we have filler colors for the offscreen color table. These are never
- used, but have to be here in order to ensure that the color table this becomes
- is a valid one from the color QD perspective. If that code hates it, we will
- too. This will fill the table out to be a full 256 colors. *** needed? */
- $"00D2 AAAA 5555 AAAA" /* a weird number to set it apart, easier debugging. */
- $"00D3 AAAA 5555 AAAA"
- $"00D4 AAAA 5555 AAAA"
- $"00D5 AAAA 5555 AAAA"
- $"00D6 AAAA 5555 AAAA"
- $"00D7 AAAA 5555 AAAA"
- $"00D8 AAAA 5555 AAAA"
- $"00D9 AAAA 5555 AAAA"
- $"00DA AAAA 5555 AAAA"
- $"00DB AAAA 5555 AAAA"
- $"00DC AAAA 5555 AAAA"
- $"00DD AAAA 5555 AAAA"
- $"00DE AAAA 5555 AAAA"
- $"00DF AAAA 5555 AAAA"
- $"00E0 AAAA 5555 AAAA"
- $"00E1 AAAA 5555 AAAA"
- $"00E2 AAAA 5555 AAAA"
- $"00E3 AAAA 5555 AAAA"
- $"00E4 AAAA 5555 AAAA"
- $"00E5 AAAA 5555 AAAA"
- $"00E6 AAAA 5555 AAAA"
- $"00E7 AAAA 5555 AAAA"
- $"00E8 AAAA 5555 AAAA"
- $"00E9 AAAA 5555 AAAA"
- $"00EA AAAA 5555 AAAA"
- $"00EB AAAA 5555 AAAA"
- $"00EC AAAA 5555 AAAA"
- $"00ED AAAA 5555 AAAA"
- $"00EE AAAA 5555 AAAA"
- $"00EF AAAA 5555 AAAA"
- $"00F0 AAAA 5555 AAAA"
- $"00F1 AAAA 5555 AAAA"
- $"00F2 AAAA 5555 AAAA"
- $"00F3 AAAA 5555 AAAA"
- $"00F4 AAAA 5555 AAAA"
- $"00F5 AAAA 5555 AAAA"
- $"00F6 AAAA 5555 AAAA"
- $"00F7 AAAA 5555 AAAA"
- $"00F8 AAAA 5555 AAAA"
- $"00F9 AAAA 5555 AAAA"
- $"00FA AAAA 5555 AAAA"
- $"00FB AAAA 5555 AAAA"
- $"00FC AAAA 5555 AAAA"
- $"00FD AAAA 5555 AAAA"
- $"00FE AAAA 5555 AAAA"
- $"00FF 0000 0000 0000" /* end of set is black. */
- };
-
- /* Now a palette that is associated with every window automatically when the
- window is opened. The resource ID matches that of the window template.
- This palette is very mellow, just the first 16 colors as the standard
- color palette. The first 16 colors are there so that
- in lower depths we will use a known set of colors, and while we are
- using known colors we might as well make them ones that will help
- avoid spurious color updates. This is the system palette. Anybody using
- the default colors will get these helping them to look better. This
- palette will have no effect in > kNumColors mode since we blast the
- colors around. */
-
- data 'pltt' (1001, preload, nonpurgeable) {
- $"000F 0000 0000 0000 0000 0000 0000 0000" /* 16 colors in table. */
- $"FFFF FFFF FFFF 0000 0000 0000 0000 0000" /* white as first guy. */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* black as second */
- $"FC00 F37D 052F 0002 0000 0000 0000 0000" /* next 14 entries from system palette */
- $"FFFF 648A 028C 0002 0000 0000 0000 0000" /* all set as tolerant 0 to ensure */
- $"DD6B 08C2 06A2 0002 0000 0000 0000 0000" /* they are always there. */
- $"F2D7 0856 84EC 0002 0000 0000 0000 0000"
- $"46E3 0000 A53E 0002 0000 0000 0000 0000"
- $"0000 0000 D400 0002 0000 0000 0000 0000"
- $"0241 AB54 EAFF 0002 0000 0000 0000 0000"
- $"1F21 B793 1431 0002 0000 0000 0000 0000"
- $"0000 64AF 11B0 0002 0000 0000 0000 0000"
- $"5600 2C9D 0524 0002 0000 0000 0000 0000"
- $"90D7 7160 3A34 0002 0000 0000 0000 0000"
- $"C000 C000 C000 0002 0000 0000 0000 0000"
- $"8000 8000 8000 0002 0000 0000 0000 0000"
- $"4000 4000 4000 0002 0000 0000 0000 0000"
- };
-
-
- /* we put the latest SIZE template here so we can rez with MPW 2.0 */
-
- type 'SIZE' {
- boolean dontSaveScreen,
- saveScreen;
- boolean ignoreSuspendResumeEvents,
- acceptSuspendResumeEvents;
- boolean enableOptionSwitch,
- disableOptionSwitch;
- boolean cannotBackground,
- canBackground;
- boolean notMultiFinderAware,
- multiFinderAware;
- boolean notOnlyBackground,
- onlyBackground;
- boolean dontGetFrontClicks,
- getFrontClicks;
- unsigned bitstring[9] = 0;
- unsigned longint; /* preferred memory size in bytes */
- unsigned longint; /* minimum memory size in bytes */
- }; /* ignore the warning caused by re-defining SIZE */
-
-
- /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
-
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- disableOptionSwitch,
- canBackground,
- multiFinderAware, /* this says we do our own activate/deactivate; don't fake us out */
- notOnlyBackground, /* this is definitely not a background-only application! */
- dontGetFrontClicks, /* change this is if you want "do first click" behavior like the Finder */
- #ifdef Debugging
- 1050 * 1024,
- 500 * 1024
- #else
- 1050 * 1024,
- 420 * 1024
- #endif
- };
-
- resource 'DITL' (201, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {145, 182, 165, 262},
- Button {
- enabled,
- "OK, OK."
- },
- /* [2] */
- {10, 80, 133, 304},
- StaticText {
- disabled,
- "FracApp, version 1.0 by Bo3b Johnson. Calculates the Mandelbrot "
- "set using direct 68881 code for maximum speed. Color table "
- "animation and color mapping for effect. Select an area with "
- "the mouse to zoom in."
- },
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 201
- }
- }
- };
-
- resource 'ALRT' (201, purgeable) {
- {90, 100, 270, 412},
- 201,
- {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- }
- };
-
- /* The icon used in the about box. The same as the program ICN#, but ICON instead. */
- resource 'ICON' (201, purgeable) {
- $"0000 0001 0000 0002 0000 0004 0040 0018 0020 0418 001C 03E0 001C 03E0 001F FFE0"
- $"0007 FFE0 0007 FFE0 0007 FF90 0007 FF80 FFFF FF80 FFFF FF80 DFFF FF80 EFFF FF80"
- $"F1FF FF80 F1FF FF80 F1FF FFE0 FE07 FFE0 FE07 C0E0 FE07 8050 FE07 3028 FE01 C810"
- $"FE0E 7F8F FFE2 3007 FFFF 0007 FFFF 8007 FFFF E007 FFFF FFE7 FFFF F01F FFFF F007"
- };
-
- /* For the menus, except the Apple menu, we set the enable flags to zero for
- simplicity. The right pieces will get enabled by the MacApp handlers (DoSetUpMenus
- for whatever object can do it), so we'll start with disabled. */
- resource 'cmnu' (1) {
- 1,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- apple,
- { /* array: 2 elements */
- /* [1] */
- "About FracApp…", noIcon, noKey, noMark, plain, cAboutApp;
- /* [2] */
- "-", noIcon, noKey, noMark, plain, nocommand
- }
- };
-
- resource 'cmnu' (2) {
- 2,
- textMenuProc,
- 0x0,
- enabled,
- "File",
- { /* array: 12 elements */
- /* [1] */
- "New", noIcon, "N", noMark, plain, cNew;
- /* [2] */
- "Open…", noIcon, "O", noMark, plain, cOpen;
- /* [3] */
- "-", noIcon, noKey, noMark, plain, nocommand;
- /* [4] */
- "Close", noIcon, "W", noMark, plain, cClose;
- /* [5] */
- "Save", noIcon, "S", noMark, plain, cSave;
- /* [6] */
- "Save As…", noIcon, noKey, noMark, plain, cSaveAs;
- /* [7] */
- "Save a Copy In…", noIcon, noKey, noMark, plain, cSaveCopy;
- /* [8] */
- "-", noIcon, noKey, noMark, plain, nocommand;
- /* [9] */
- "Quit", noIcon, "Q", noMark, plain, cQuit
- }
- };
-
- resource 'cmnu' (3) {
- 3,
- textMenuProc,
- 0x0,
- enabled,
- "Edit",
- { /* array: 8 elements */
- /* [1] */
- "Undo", noIcon, "Z", noMark, plain, cUndo;
- /* [2] */
- "-", noIcon, noKey, noMark, plain, nocommand;
- /* [3] */
- "Cut", noIcon, "X", noMark, plain, cCut;
- /* [4] */
- "Copy", noIcon, "C", noMark, plain, cCopy;
- /* [5] */
- "Paste", noIcon, "V", noMark, plain, cPaste;
- /* [6] */
- "Clear", noIcon, noKey, noMark, plain, cClear;
- /* [7] */
- "-", noIcon, noKey, noMark, plain, nocommand;
- /* [8] */
- "Show Clipboard", noIcon, noKey, noMark, plain, cShowClipboard
- }
- };
-
- resource 'cmnu' (4) {
- 4,
- textMenuProc,
- 0x0,
- enabled,
- "Zoomy",
- { /* array: 1 elements */
- /* [1] */
- "New from selection", noIcon, noKey, noMark, plain, 1000;
- /* [2] */
- "-", noIcon, noKey, noMark, plain, nocommand;
- /* [3] */
- "Rotate Colors", noIcon, noKey, noMark, plain, 1001
- }
- };
-
- resource 'MBAR' (128) {
- {1; 2; 3; 4}
- };
-
-
- /* Now the pattern that is used for the selection rectangle. */
-
- resource 'PAT ' (128, preload, nonpurgeable) {
- $"FCF9 F3E7 CF9F 3F7E"
- };
-
-
- /* list mapping of our error code to the info string. */
-
- resource 'errs' (1128, purgeable) {
- { whichList, 0, 1100;
- 1000, 1000, 1; /* error code if wrong machine, crash avoidance. */
- -152, -151, 3 /* translate Color Manager error to out of mem. */
- }
- };
-
- /* The info strings for our errors. The first is for special handling on the
- init when we have a computer where we would crash, the second is to
- handle the color animation failing in a place where we can't give use
- a normal error string. */
-
- resource 'STR#' (1100, purgeable) {
- { /* [1] */ "Color QuickDraw, a 68881 (FPU), and the latest System "
- "are required";
- /* [2] */ "continue rotating colors";
- /* [3] */ "there is not enough memory"
- }
- };
-
-
- /* Now all the baggage required for the Icons at the Finder. No real
- program keeps the default Icon. Herein is the BNDL, Arf , ICN#, FREF
- resources required. The 'Arf ' is the application type. Registered
- of course. */
-
- resource 'ICN#' (128) {
- { /* array: 2 elements */
- /* [1] */
- $"0000 0001 0000 0002 0000 0004 0040 0018 0020 0418 001C 03E0 001C 03E0 001F FFE0"
- $"0007 FFE0 0007 FFE0 0007 FF90 0007 FF80 FFFF FF80 FFFF FF80 DFFF FF80 EFFF FF80"
- $"F1FF FF80 F1FF FF80 F1FF FFE0 FE07 FFE0 FE07 C0E0 FE07 8050 FE07 3028 FE01 C810"
- $"FE0E 7F8F FFE2 3007 FFFF 0007 FFFF 8007 FFFF E007 FFFF FFE7 FFFF F01F FFFF F007",
- /* [2] */
- $"0000 0001 0000 0002 0000 0004 0040 0018 0020 0418 001C 03E0 001C 03E0 001F FFE0"
- $"0007 FFE0 0007 FFE0 0007 FF90 0007 FF80 FFFF FF80 FFFF FF80 FFFF FF80 FFFF FF80"
- $"FFFF FF80 FFFF FF80 FFFF FFE0 FFFF FFE0 FFFF FFE0 FFFF FFF0 FFFF FFF8 FFFF FFF0"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF F01F FFFF F007"
- }
- };
-
- resource 'ICN#' (129) {
- { /* array: 2 elements */
- /* [1] */
- $"0FFF FC00 0C00 0200 0A00 0100 0980 0080 0982 0040 087C 03A0 087C 0390 087F FF90"
- $"087F FE10 087F FE10 089F FE10 081F FE10 081F FFF0 081F FFF0 081F FFF0 081F FFF0"
- $"081F FFF0 081F FFF0 087F FFF0 0870 FFF0 0870 FFF0 0880 FFF0 0900 FFF0 0800 FFF0"
- $"0800 FFF0 0800 FFF0 0800 FFF0 0800 FFF0 0800 FFF0 0800 FFF0 0800 FFF0 0FFF FFF0",
- /* [2] */
- $"0FFF FC00 0FFF FE00 0FFF FF00 0FFF FF80 0FFF FFC0 0FFF FFE0 0FFF FFF0 0FFF FFF0"
- $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
- $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
- $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
- }
- };
-
- resource 'BNDL' (128) {
- 'Arf ',
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'ICN#',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, 128,
- /* [2] */
- 1, 129
- },
- /* [2] */
- 'FREF',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, 128,
- /* [2] */
- 1, 129
- }
- }
- };
-
- resource 'FREF' (128) {
- 'APPL',
- 0,
- ""
- };
-
- resource 'FREF' (129) {
- 'PICT',
- 1,
- ""
- };
-
-
- type 'Arf ' as 'STR ';
-
- resource 'Arf ' (0) {
- "FracApp version 1.0" /* the ID string as part of Bundle. */
- };
-
-
- /* The mem! resource that MacApp uses to know how much more space we need to
- reserve. We reserve a big old 40K just for fun, so we don't have to narrow
- down the memory useage too closely. This is big enough to cut us slack
- during the big picture playbacks. A little wasteful. We aren't currently
- using the low space reserve, since we don't have many commands to implement.
- Our memory useage comes in big hunks so it is not as useful to watch for
- crossing a low memory barrier. We tend to run out completely or not at
- all. We could check the space is low before allowing the new fractal
- operations, but currently it will fail during the allocation and let
- the user know. Somewhat less friendly, but adequate. The 40K number
- was found heuristically by examing the heap with TMon to see how
- big the code blocks are. */
-
- resource 'mem!' (1000) {
- 40000, /* code reserve size */
- 0, /* low space reserve size */
- 0 /* stack size */
- };
-